﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Data;

namespace CreateXSD
{
    class Program
    {
        static void Main(string[] args)
        {
            XmlDocument doc = new XmlDocument();
            doc.Load(@"C:\TransferConfig.xml");
            DataSet ds = new DataSet(); byte[] buf =
               System.Text.ASCIIEncoding.ASCII.GetBytes(doc.OuterXml);
            System.IO.MemoryStream ms = new System.IO.MemoryStream(buf);
            ds.ReadXml(ms, XmlReadMode.InferSchema); ms.Close();
            ds.WriteXmlSchema(@"C:\x.xsd");
        }
    }
}
